package com.tinygray.lock;

import lombok.Getter;

import java.util.concurrent.CountDownLatch;

/**
 * @Author: tinygray
 * @Description: 公众号:Madison龙少，关注我你会越来越优秀。
 * @className: CountDownEnum
 * @create: 2021-05-08 19:29
 */
@Getter
public enum CountDownEnum {
    ONE(1,"齐"),
    TWO(2,"燕"),
    THREE(3,"赵"),
    FOUR(4,"楚"),
    FIVE(5,"魏"),
    SIX(6, "韩"),;

    CountDownEnum(Integer retCode, String retMsg) {
        this.retCode = retCode;
        this.retMsg = retMsg;
    }

    private final Integer retCode;
    private final String retMsg;

    public static CountDownEnum ForEach_CountDownEnum(Integer index) {
        CountDownEnum[] values = CountDownEnum.values();
        for (CountDownEnum element : values) {
            if (index.equals(element.getRetCode())) {
                return element;
            }
        }
        return null;
    }
}

